package org.fxml.helpers {

	/**
	 * @author jordandoczy
	 */
	public class AbstractBuilder implements IBuilder {
		
		protected var _baseBuilder:IBuilder;
		
		public function AbstractBuilder(baseBuilder:IBuilder=null){
			if(baseBuilder) _baseBuilder = baseBuilder;
		}
		
		public function convertValue(value:XML):*{
			if(_baseBuilder) return _baseBuilder.convertValue(value);
			return null;
		}
		
		public function hasProperty(instance:Object, property:String):Boolean{
			if(_baseBuilder) return _baseBuilder.hasProperty(instance, property);
			return false;
		}
		
		public function isFunction(instance:Object, property:String):Boolean{
			if(_baseBuilder) return _baseBuilder.isFunction(instance, property);
			return false;
		}
		
		public function setProperty(instance:Object, property:String, value:*):void{
			if(_baseBuilder) _baseBuilder.setProperty(instance, property, value);
		}
	}
}
